<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
  <%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="${ctx }/style/css_member.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${ctx }/js/common.js"></script>
<script type="text/javascript" src="${ctx }/js/jquery-1.3.2.js"></script>
<script language="javascript" type="text/javascript" src="${ctx }/js/My97DatePicker/WdatePicker.js"></script>
<title>文章列表</title>

<script type="text/javascript">

/******改变作品上传状态 *****/
function changeState(id,status){
	if(status == '2'){
		if (window.confirm("确认删除此文章？")) {
			
			var url = "${ctx}/article/articleAction!changeUploadState.do?article.id="+id+"&operateStr="+status;
			window.location.href = url;
		}
	}else{
		var url = "${ctx}/article/articleAction!changeUploadState.do?article.id="+id+"&operateStr="+status;
		window.location.href = url;
	}
}

/**************  查询  *******************/
function search(){

	var actionUrl = "${ctx}/article/articleAction!list.do";

	$("#curPage").val(1);
	$("#searchForm").attr("action",actionUrl);
	$("#searchForm").submit();
}

$(function(){
	m2('m1_005','m1_005_07');
});

</script>

</head>

<body>

<!-- 页面头部  -->
<jsp:include page="/commons/head_member.jsp"></jsp:include>

<form action="${ctx}/article/articleAction!list.do" id="searchForm" name="searchForm" method="post">
<table width="960" cellpadding="0" cellspacing="0" class="tbl_list_border" align="center">
<tr><td>
		<table width="900" border="0" cellspacing="0" cellpadding="0" align="center" style="margin: 0 auto;">
			<tr><td>
			<table width="100%" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td class="nw12a" width="60" align="right">
				标题：</td><td><input name="filterTxt" value="title" type="hidden"/>
				<input name="filterValue" type="text" size="15" value="${filterValue }"/>
				<img src="../images/an25.gif" width="50" height="21" align="absmiddle" onclick="search()" style="cursor: pointer" >
				</td>
			</tr>
			<tr>
			<td class="nw12a"  align="right">
				开始时间：</td><td> <input name="startDate" type="text" size="15" onClick="WdatePicker()" value="<fmt:formatDate value='${startDate }' pattern='yyyy-MM-dd'/>">&nbsp;&nbsp;
              	结束时间：<input name="endDate" type="text" size="15" onClick="WdatePicker()"  value="<fmt:formatDate value='${endDate }' pattern='yyyy-MM-dd'/>">&nbsp;&nbsp;
				<img src="../images/an25.gif" width="50" height="21" align="absmiddle" onclick="search()" style="cursor: pointer" >
				</td>
			</tr>
			<tr><td height="5"></td></tr>
			</table>
			</td></tr>
			<tr><td colspan="100%">
			<table width="900" align="center" border="0" cellpadding="0" cellspacing="1" bordercolor="#0099CC" bgcolor="#0099CC" >
			    <tr bgcolor="#CDE1ED">
                    <td class="nw12b" height="30" align="center">序号</td>
                    <td class="nw12b" align="center">主题</td>
                    <td class="nw12b" align="center">发布时间</td>
                    <td class="nw12b" align="center">发布者</td>
                    <td class="nw12b" align="center">审核状态</td>
                    <td class="nw12b" align="center">审核/编辑</td>
                </tr>
                <c:forEach items="${page.result}" var="result" varStatus="status">                  
	                <tr bgcolor="#FFFFFF">
		                    <td class="nw12b"  height="30" align="center">${status.count }</td>
		                    <td class="nw12b" align="center">${result.title }</td>
		                    <td class="nw12b" align="center"><fmt:formatDate value="${result.uploadTime }" pattern="yyyy-MM-dd HH:mm"/></td>
		                    <td class="nw12b" align="center">${result.entryPerson.username }</td>
		                    <td class="nw12b" align="center">${result.auditState.name }</td>
		                    <td class="nw12b" align="center">
		                    	<a style="color: blue;cursor: pointer"  href="javascript:changeState(${result.id },'3')">通过</a>&nbsp;
								<a style="color: blue;cursor: pointer"  href="javascript:changeState(${result.id },'4')">不通过</a>&nbsp;
								<a style="color: blue;cursor: pointer" href="${ctx}/article/articleAction!modifyPrepare.do?article.id=${result.id }">修改</a>&nbsp;
								<a style="color: blue;cursor: pointer"  href="javascript:changeState(${result.id },'2')">删除</a>
		                    </td>
		             </tr>
	            </c:forEach>
			</table>
		</td></tr>
		<tr>
              <td colspan="100%" class="nw12a" align="right" height="30"><jsp:include page="/commons/paging_footer.jsp"/> </td>
        </tr>
	</table>
</td></tr>
</table>
</form>
    
<jsp:include page="/commons/foot_member.jsp"></jsp:include>

</body>
</html>